//
//  WithDrawlRecordFailuerTableViewCell.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/6.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "WithDrawlRecordFailuerTableViewCell.h"

@interface WithDrawlRecordFailuerTableViewCell ()
{
    GLGWLabel *leftLab;
}
@end

@implementation WithDrawlRecordFailuerTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor whiteColor];
        GLGWLabel *lab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        lab.text = @"审核状态";
        [lab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.left.equalTo(self.contentView).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        leftLab = lab;
        
        GLGWLabel *righLab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self.contentView];
        righLab.text = @"审核失败";
        [righLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.lessThanOrEqualTo(lab.mas_right);
            make.right.equalTo(self.contentView.mas_right).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        righLab.textAlignment = NSTextAlignmentRight;
        
        GLGWLabel *lilab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#333333"] inSuperView:self.contentView];
        lilab.text = @"失败原因";
        [lilab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(lab.mas_left);
            make.top.equalTo(lab.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(17)));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(50)));
        }];
        
        GLGWLabel *liRighLab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#EC5353"] inSuperView:self.contentView];
        liRighLab.text = @"银行卡填写错误";
        [liRighLab mas_updateConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(lilab.mas_right).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView.mas_right).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.top.equalTo(righLab.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(11));
            make.bottom.equalTo(@(-kHeightProportion_In_iPhoneTriploid(12)));
        }];
        liRighLab.numberOfLines = 0;
        liRighLab.textAlignment = NSTextAlignmentRight;
        self.rightLab = liRighLab;
        
        [self hiderLine:NO];
        [self setSepartionLineWith:lineModel_Half];
    }
    return self;
}

- (void)setLeftStr:(NSString *)leftStr
{
    _leftStr = leftStr;
    leftLab.text = leftStr;
}

- (void)setRightLab:(GLGWLabel *)rightLab
{
    _rightLab = rightLab;
}


@end
